class Quad:
    def __init__(self, a1,b1,c1,d1):
        self.a = a1
        self.b = b1
        self.c = c1
        self.d = d1
    def getEdge(self ):
        print("四条边长度：a:{} b:{} c:{} d:{}".format(self.a,self.b,self.c,self.d))

class Parallel(Quad):
    def __init__(self, a1 , b1):
        #作为父类的实例
        super().__init__(a1,a1,b1,b1) #a = a1 , b = a1, c = b1 , d = b1
    
    def getGirth(self):
        print("周长:{}".format(self.a + self.b + self.c + self.d))
        
class Rect(Parallel):
    def getArea(self):
        print("面积:{} ".format(self.a * self.c))
        
class Square(Rect):
    def __init__(self, a):
        super().__init__(a,a)
    def getGirth(self):
        print("周长:{}".format(self.a * 4))
    def getArea(self):
        print("面积:{}".format(self.a ** 2))

        